/**
 * Created by cchen on 2015/4/16.
 */

/*
 * Mobile App to share link to any App
 */

module.exports = function (app) {
    var share = require('../../controllers/mobile/shares-controller');

    //Share content with questions and activities
    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/questions/getQuestionShare/:targetApp/:userId/:questionId/:deviceId', share.shareQuestion);
    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/activities/getActivityShare/:targetApp/:userId/:activityId/:deviceId', share.shareActivity);
    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/specialTopic/getSpecialTopicShare/:targetApp/:userId/:topicId/:deviceId', share.shareSpectialTopic);
    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/app/getAppShare/:targetApp/:userId/:deviceId', share.shareApp);


    app.get('/rest/' + RESTFullServiceVersion + '/mobile/web/share/:shareId/:userId', share.getSharedFeeds);

    app.get('/rest/' + RESTFullServiceVersion + '/mobile/web/getAppUserShare/:userId', share.getAppUserShare);

    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/activities/getPartakesByActivityId/:pageNo/:activityId', share.getPartakesByActivityId);
    app.get('/rest/' + RESTFullServiceVersion + '/mobile/shares/activities/getActivityMessageCode/:phone', share.getActivityMessageCode);
    app.post('/rest/' + RESTFullServiceVersion + '/mobile/shares/activities/joinInActivityByWechat', share.joinInActivityByWechat);
};